home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1275 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: thor.tu.hac.com!collins
  2. From: collins@thor.tu.hac.com (Ron Collins)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Constructor?
  5. Date: 12 Jan 1996 19:27:06 GMT
  6. Organization: Advanced Depot Systems
  7. Message-ID: <4d6cma$d23@hacgate2.hac.com>
  8. References: <00001a80+00006b6c@msn.com>
  9. NNTP-Posting-Host: thor.tu.hac.com
  10.  
  11. kenneth long (Pacu@msn.com) wrote:
  12. : In a program example, I saw something similar to the following:
  13.  
  14. :         public:
  15. :             CString str;
  16. :                 (etc..)
  17.  
  18.  
  19. :         Later, in a function, I saw: 
  20.  
  21. :         Function()
  22. :                     
  23. :             Cstring str;
  24. :                 (etc..)
  25.  
  26. : In episode one, is it declaring str to be of CString type or is it 
  27. : constructed there? And in the second instance, inside of the 
  28. : function, is it being constructed or is it a variable of CString 
  29. : type? If this example is too vague, I will try to find the missing 
  30. : pieces, but I ask it in a general sense concerning the nature of 
  31. : constuctors and variable tpe declaration. Any help is appreciated via 
  32. : personal e-mail. Pacu.
  33. :             
  34.  
  35. Based on your example, it's impossible to tell if Cstring employs a constructor,
  36. or is a simple defined type.
  37.  
  38. BTW, this belongs over in comp.lang.c++.  The C language knows nothing about
  39. "public", "constructor", etc.
  40.  
  41. BTW again, are you the same "Pacu" that was looking for certification as a
  42. C++ programmer?  If so, then I would suggest that you are _not_ ready for
  43. certification yet.
  44.  
  45.             -- Collins --
  46.  
  47.